package com.sh.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;

/**
 * @ClassName ConfigBean
 * @Description ConfigBean
 * @Author yaoqiang
 * @Date 2020/10/27 13:46
 * @Version 1.0
 */
@Component  //让spring管理的注解，
@EnableJms //开启jms适配
public class ConfigBean {
    @Value("${myqueue}")
    private String myQueue ;

    @Bean   // bean id=""  class="…"
    public ActiveMQQueue queue(){
        return  new ActiveMQQueue(myQueue);
    }

}
